//
//  DDPositionFootView.m
//  DingDongZP
//
//  Created by Ray on 16/4/22.
//  Copyright © 2016年 iyhjiang.com. All rights reserved.
//

#import "DDPositionFootView.h"

@implementation DDPositionFootView

- (void)awakeFromNib {
    [super awakeFromNib];
    self.positionShow.layer.masksToBounds = YES;
    self.positionShow.layer.cornerRadius = 2.0;
    self.positionShow.layer.borderColor = [UIColor grayColor].CGColor;
    self.positionShow.borderStyle = 3;
//    self.positionShow.layer.borderWidth = 1.0;
    self.positionShow.delegate = self;
    
    [self.positionShow addTarget:self action:@selector(textFieldChanged:) forControlEvents:UIControlEventEditingChanged];
}

- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
    if (self.didGetValue) {
        self.didGetValue(textField.text);
    }
    [textField resignFirstResponder];
    return YES;
}

- (void)textFieldChanged:(UITextField *)textfield
{
   
    if (self.didGetValue) {

        self.didGetValue(textfield.text);
    }
}

@end
